var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
// 声明装饰器修饰方法/属性
function method(target, propertyKey, descriptor) {
    console.log("target=", target);
    console.log("pk=" + propertyKey);
    console.log("desc=" + JSON.stringify(descriptor) + "\n\n");
    // 让当前属性(say)不可编辑
    descriptor.writable = false;
}
function property(target, propertyKey) {
    console.log("target", target);
    console.log("propertyKey", propertyKey);
}
var PersonIII = /** @class */ (function () {
    function PersonIII() {
        this.name = "huihui";
    }
    PersonIII.prototype.sayHello = function () {
        console.log("基尼太美");
    };
    PersonIII.run = function () {
        return "static method";
    };
    __decorate([
        property
    ], PersonIII.prototype, "name", void 0);
    __decorate([
        method
    ], PersonIII.prototype, "sayHello", null);
    __decorate([
        method
    ], PersonIII, "run", null);
    return PersonIII;
}());
var xhf = new PersonIII();
// 修改实例方法say
xhf.sayHello = function () {
    console.log("亭前一席话，胜坐十年牢");
};
xhf.sayHello();
